package document;

/**
* Created by Pavel Nikolaev
*/
public class AttributeSet implements Cloneable {
    /*
    private int mySizeLevel;
    private boolean myItalicMode = false;
    private boolean myBoldMode = false;
    private boolean myUnderlinedMode = false;
    private boolean myPreformattedMode = false;
    */

    public int mySizeLevel;
    public boolean myItalicMode = false;
    public boolean myBoldMode = false;
    public boolean myUnderlinedMode = false;
    public boolean myPreformattedMode = false;


    public AttributeSet(int level) {
        if ((level < 0) || (level > 6)) level = 0;
        this.mySizeLevel = level;
        this.myItalicMode = false;
        this.myBoldMode = false;
        this.myUnderlinedMode = false;
        this.myPreformattedMode = false;
    }

    /*
    public boolean isUnderlined() {
        return myUnderlinedMode;
    }

    public boolean isPreformatted() {
        return myPreformattedMode;
    }

    public boolean isBold() {
        return myBoldMode;
    }

    public boolean isItalic() {
        return myItalicMode;
    }

    public int getSizeLevel() {
        return mySizeLevel;
    }
    */

    public AttributeSet clone() {
        try {
            return (AttributeSet)super.clone();
        } catch (CloneNotSupportedException e) {
            return null;
            //BrowserLogger.log(e.getMessage());
        }
    }
}
